package cn.stylefeng.guns.sys.modular.system.service;

import cn.stylefeng.guns.sys.core.util.RedisUtils;
import com.alibaba.fastjson.JSONObject;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class RedisService {
    @Resource
    private RedisUtils redisUtils;

    @Async
    public void saveRedis(String ywxttokenmap, String token, String username) {
        JSONObject dataJson = new JSONObject();
        dataJson.put("account",username);
        redisUtils.hset(ywxttokenmap,token,dataJson);
        System.out.println("saveRedis");
    }
}
